<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<jsp:useBean id="gameBean" class="model.MenschBean" scope="session" />

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
	<head>
		<title>EWA Mensch &auml;rgere Dich nicht :: Spiel 1</title>
		<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1"/>
		<meta name="description" content="Das EWA Mensch &auml;rgere Dich nicht, ein Spa&szlig; der niemals endet."/>
		<meta name="keywords" content="Spiel EWA Mensch &auml;rgere Dich nicht"/>
		<meta name="language" content="de-AT"/>
		<link rel="stylesheet" type="text/css" href="styles/screen.css"/>
                                    
	</head>
	<body>
		<div id="wrapper">
			<div id="header">
				<div id="teaser"></div>
				<div id="logo"></div>
				<h1>EWA Mensch &auml;rgere Dich nicht</h1>
			</div>
			<ul class="accessibility">
				<li><a href="#navigation" accesskey="2">Navigation</a></li>
				<li><a href="#board" accesskey="0">Spielbrett</a></li>
				<li><a href="#dicearea" accesskey="1">W&uuml;rfel</a></li>
				<li><a href="#info_area" accesskey="3">Spielstand</a></li>
			</ul>
			<div id="body">
				<div id="navigation">
					<h2 class="accessibility">Navigation</h2>
					<ul>
						<li><a href="#">Userdaten &auml;ndern</a></li>
						<li><a href="#">Zur&uuml;ck zur Lounge</a></li>
						<li><a href="#">Ausloggen</a></li>
					</ul>
				</div>
				<hr class="accessibility" />				
				<div id="info_area">
					<% if (!gameBean.isInProgress()) { %>
						<form action="MenschServlet" method="post">
							<input type="submit" value="Restart Game" />
						</form>
					<% } %>
					<h2>Spielinformationen</h2>
					<table class="game_info" summary="Diese Tabelle zeigt Informationen zum aktuellen Spiel">
						<tbody>
							<tr class="accessibility">
								<th>Information</th>
								<th>Wert</th>
							</tr>
							<tr>
								<th>Anzahl Spieler</th>
								<td><%=gameBean.getNumberOfPlayers() %></td>
							</tr>
							<tr>
								<th>F&uuml;hrender</th>
								<td><%=gameBean.getLeaderName()%></td>
							</tr>
							<tr>
								<th>Aktuelle Runde</th>
								<td><%=gameBean.getCurrentRound() %></td>
							</tr>
							<tr>
								<th>Zeit</th>
								<td><%=gameBean.getTime() %></td>
							</tr>
						</tbody>
					</table>
					<h2>Spieler</h2>
					<table class="game_info" summary="Diese Tabelle listet die Namen der Spieler auf">
						<tbody>
							<tr class="accessibility">
								<th>Spielernummer</th>
								<th>Spielername</th>
							</tr>
							
							<% for (int i=0; i<gameBean.getNumberOfPlayers(); i++) { %>
							<tr>
								<th>Spieler <%=i+1 %></th>
								<td><%=gameBean.getPlayerName(i) %></td>
							</tr>
							<% } %>
						</tbody>
					</table>
				</div>
				<div id="dicearea">
					<hr class="accessibility" />
					<h2 class="accessibility">W&uuml;rfel</h2>
					<span title='aktueller Spieler'><%=gameBean.getPlayerName()%></span>
					<%if (gameBean.isInProgress()) { %><a href="MenschServlet?action=roll"><% } %><img name="wuerfel" title="W&uuml;rfel Zahl <%=gameBean.getCurrentDiceValue() %>" src="img/wuerfel<%=gameBean.getCurrentDiceValue() %>.png" alt="W&uuml;rfel Zahl <%=gameBean.getCurrentDiceValue() %>"/><%if (gameBean.isInProgress()) { %></a><% } %>
				</div>
				<div id="play_area">
					<hr class="accessibility" />
					<div id="board">
						<h2 class="accessibility">Spielbrett</h2>
						<div class="fields">
							<h3 class="accessibility">Spielfelder</h3>
							<ol title="Spielfelder">
								<% for (int i=0; i<40; i++) { %>
									<li><img id='field<%=i+1 %>' src='img/<%=gameBean.getFieldImageFilename(i) %>' alt='<%=gameBean.getFieldTitle(i) %>' title='<%=gameBean.getFieldTitle(i) %>' /></li>
								<% } %>
							</ol>
							
							<h3 class="accessibility">Starth&auml;user</h3>
							<% for (int j=0; j<4; j++) { %>
							<ol title="Starthaus Spieler <%= j+1%>">
								<% for (int i=40+j*4; i<44+j*4; i++) { %>
									<li><img id='field<%=i+1 %>' src='img/<%=gameBean.getFieldImageFilename(i) %>' alt='<%=gameBean.getFieldTitle(i) %>' title='<%=gameBean.getFieldTitle(i) %>' /></li>
								<% } %>
							</ol>
							<% } %>
							
							<h3 class="accessibility">Zielh&auml;user</h3>
							<% for (int j=0; j<4; j++) { %>
							<ol title="Zielhaus Spieler <%= j+1%>">
								<% for (int i=56+j*4; i<60+j*4; i++) { %>
									<li><img id='field<%=i+1 %>' src='img/<%=gameBean.getFieldImageFilename(i) %>' alt='<%=gameBean.getFieldTitle(i) %>' title='<%=gameBean.getFieldTitle(i) %>' /></li>
								<% } %>
							</ol>
							<% } %>
						</div>
						<div class="clearer"></div>  
						<div id="infogegner">W&uuml;rfelergebnis Computer: <%=gameBean.getRecentDiceValues() %></div>
					</div>
				</div>				
			</div>
			<div id="footer">
				<p>&copy; 2012 EWA Mensch &auml;rgere Dich nicht.</p>
			</div>
        </div>
    </body>
</html>                           